package cn.u313.model;

import java.util.List;

public class MusicModel {
    private List<Data> data;
    public void setData(List<Data> data) {
        this.data = data;
    }
    public List<Data> getData() {
        return data;
    }
    @Override
    public String toString() {
        if(data==null||data.size()==0)
            return "未查询到歌曲！可能是你的格式不对哦！试试\n如：点歌周杰伦 晴天";
        String str="";
        for (int i = 0; i < data.size(); i++) {
            Data music =data.get(i);
            str+= (i+1)+"."+ music.getSong()+"--"+music.getSingger()+"\n";
        }
        return "搜索列表如下\n" +
                "--------------------\n" +
                ""+str+"" +
                "--------------------\n" +
                "回复序号进行选取歌曲"
                ;
    }
}
